iOS模拟器有些功能没有,比如拍照,因此代码中需要加个模拟器判断,查了好多文章,终于找到了。swift代码如下:
1 | struct Platform { |
参考 http://themainthread.com/blog/2015/06/simulator-check-in-swift.html
iOS模拟器有些功能没有,比如拍照,因此代码中需要加个模拟器判断,查了好多文章,终于找到了。swift代码如下:
1 | struct Platform { |
参考 http://themainthread.com/blog/2015/06/simulator-check-in-swift.html
Title:iOS Swift判断代码运行在模拟器上
Author:offbye
Created:2016-02-18, 15:28:00
Updated:2016-05-13, 00:40:11
Full URL:http://offbye.com/2016/02/18/iOS Swift判断代码运行在模拟器上/
License: "CC BY-NC-SA 4.0" Keep Link & Author if Distribute.
CSDN原文: http://blog.csdn.net/offbye/article/details/50686407
CSDN PV:3053